package com.dev.jwt.controller;

import com.dev.jwt.model.emum.ResponseEnum;
import com.dev.jwt.utils.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 报错处理器
 */
@RestController
@RequestMapping("/error")
public class ErrorController {
 
    @PostMapping("/token")
    public R<?> token() {
        return R.error(ResponseEnum.NO_TOKEN);
    }
 
    @PostMapping("/tokenError")
    public R<?> tokenError() {
        return R.error(ResponseEnum.TOKEN_VERIFY_ERROR);
    }
}
